<!DOCTYPE html>
<html>
<head>
	<title></title>
	<meta charset="utf-8">
</head>
<body>
<script type="text/javascript">

  

 function show() {
    var index=0;
    do{
    	index=val.indexOf('h',index);
    	document.write(index);
    	if(index==-1){
    		break;
    	}
    }while(index!=-1)
  } 



</script>
<button >efsfesg</button>
</body>
</html>   